<?php
include "connect.php";

$sql=" select * from member order by MemID desc ";
$result=mysql_query($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>รายงานสมาชิก</title>
<style type="text/css">
body {
	margin:0px;
	font-family:Verdana, Geneva, sans-serif;
	font-size:14px;
}
.h_1 {
	text-align:center;
	font-size:24px;
	font-weight:bold;	
}
.h_2 {
	text-align:center;
	font-size:18px;
}
.h_table {
	text-align:center;
	font-weight:bold;
	background:#CCC;
}
</style>
</head>

<body>
<p>&nbsp;</p>
<table width="1100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="933"><table width="900" border="0" align="center" cellpadding="0" cellspacing="2">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td class="h_1">รายงานสมาชิก</td>
      </tr>
      <tr>
        <td><div align="center">ร้าน Cartoon Today</div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
    <?php if (mysql_num_rows($result) > 0) { ?>
    <table width="1071" border="1" align="center" cellpadding="0" cellspacing="0">
      <tr class="h_table">
        <td width="91" height="30">รหัสสมาชิก</td>
        <td width="190">ชื่อ - นามสกุล</td>
        <td width="86">วัน/เดือน/ปี เกิด</td>
        <td width="115">เลขบัตรประชาชน</td>
        <td width="139">ที่อยู่</td>
        <td width="110">เบอร์โทรศัพท์</td>
        <td width="94">E-mail</td>
        <td width="118">วันที่สมัครสมาชิก</td>
        </tr>
      <?php
		  	for ($i=1;$i<=mysql_num_rows($result);$i++) { 
				$rs=mysql_fetch_array($result);
          ?>
      <tr>
        <td height="30"><div align="center"><?php echo $rs["MemID"]; ?></div></td>
        <td>&nbsp;<?php echo $rs["MemName"]; ?></td>
        <td>&nbsp;<?php echo $rs["MemBirth"]; ?></td>
        <td>&nbsp;<?php echo $rs["MemNum"]; ?></td>
        <td>&nbsp;<?php echo $rs["MemAddress"]; ?></td>
        <td>&nbsp;<?php echo $rs["MemTel"]; ?></td>
        <td>&nbsp;<?php echo $rs["MemEmail"]; ?></td>
        <td>&nbsp;<?php echo $rs["MemRegister"]; ?></td>
        </tr>
      <?php } ?>
    </table>
    <?php } else { ?>
    <?php } ?>
    <p>&nbsp;</p>
    <p><div align="center"><a href="#" onclick="javascript:parent.window.print();"><img src="../image/icon/printer.png" width="30" height="30" /></a></div>
    </p></td>
  </tr>
</table>
</body>
</html>